import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop0019_删除属性组流程"
#1.打开后台 登录
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
#点击商品管理,商品属性,属性分组
time.sleep(1)
DBshopEnterMenu3(firefox,"商品管理","商品属性","属性")
firefox.find_element_by_xpath('//td[contains(.,"天天向上")]/following-sibling::td[4]/a[3]').click()
time.sleep(1)
firefox.switch_to.alert.accept()
time.sleep(1)
#断言
try:
    firefox.find_element_by_xpath('//td[contains(.,"天天向上")]/following-sibling::td[4]/a[3]')
    writeLog("%s 测试不通过" % testCase)
    getPhoto(firefox)
except:
    writeLog("%s 测试通过" % testCase)
    getPhoto(firefox)
firefox.quit()